package com.google.ant.extensions.types;

import java.util.Vector;
import org.apache.tools.ant.types.DataType;

public class Repository extends DataType {
    private String id;
    private Vector mirrors = new Vector();

    public void setId(String i) {
        this.id = i;
    }

    public String getId() {
        return this.id;
    }

    @SuppressWarnings("unchecked")
    public void addMirror(Mirror m) {
        mirrors.addElement(m);
    }

    public Vector getMirrors() {
        return mirrors;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("Repositories <");
        sb.append(id);
        sb.append("> has mirrors : ");
        sb.append(mirrors.toString());
        return sb.toString();
    }
}
